<?php
// +----------------------------------------------------------------------
// | Yzncms [ 御宅男工作室 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://yzncms.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 御宅男 <530765310@qq.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 全局路由
// +----------------------------------------------------------------------
//use think\facade\Route;

//---------------------基本信息-------------------------------------
Route::post("upload_img", 'app/Index/upload_img'); //上传图片
Route::get('getLWByAddress', 'app/Index/getLWByAddress');//通过地址获取经纬度
//---------------------微信小程序------------------------------------
Route::post('wxlogin', 'app/Index/wxLogin'); //获取openid
Route::post("GetPhone", 'app/Index/GetPhone');  //获取手机号
Route::post("deuser", 'app/Index/deuser'); //保存用户信息
Route::post("getUserinfoUpdateImg", 'app/Index/getUserinfoUpdateImg'); //修改用户头像
Route::post("getUserinfoUpdateName", 'app/Index/getUserinfoUpdateName');//修改用户名称
Route::get("getUserAgreement", 'app/Index/getUserAgreement');//获取用户协议
Route::get("getPrivacyAgreement", 'app/Index/getPrivacyAgreement');//获取隐私协议







//Route::post("SaveUserInfo", 'app/Index/SaveUserInfo');  //修改用户信息


//---------------------微信小程序------------------------------------
//无授权
Route::rule('getBanner', 'app/index/getBanner');// 获取banner图
Route::rule('recommendGoods', 'app/index/recommendGoods');//获取推荐商品
Route::rule('getGoodsCate', 'app/index/getGoodsCate');//获取商品分类
Route::rule('getGoodsList', 'app/index/getGoodsList');//获取商品列表
Route::rule('goodsDetail', 'app/index/goodsDetail');//获取商品列表
//有授权
Route::rule('GetWxUserInfo', 'app/WxUser/GetWxUserInfo');// 获取用户详情
//todo 增加根据当前定位获取相关信息
Route::rule('getWaterStation', 'app/WxUser/getWaterStation');//获取最近水站
Route::rule('getWaterList', 'app/WxUser/getWaterList');//获取最近水站列表
Route::rule('getTicketCate', 'app/WxUser/getTicketCate');//获取水票类型
Route::rule('getTicket', 'app/WxUser/getTicket');//通过水票分类获取水票规格
Route::rule('getAddressList', 'app/WxUser/getAddressList');//获取收货地址

Route::post('addAddress', 'app/WxUser/addAddress');//增加收货地址
Route::post('editAddress', 'app/WxUser/editAddress');//编辑收货地址
Route::rule('getDefaultAddress', 'app/WxUser/getDefaultAddress');//增加收货地址
Route::rule('getAddressById', 'app/WxUser/getAddress2');//通过id获取地址详情

Route::post('addInvoice', 'app/WxUser/addInvoice');//增加发票抬头
Route::post('editInvoice', 'app/WxUser/editInvoice');//编辑发票抬头
Route::get('getInvoice', 'app/WxUser/getInvoice');//查看发票抬头详情
Route::get('ToInvoice', 'app/WxUser/ToInvoice');//开发票
Route::get('waterTicketList', 'app/WxUser/waterTicketList');//水票订单列表


Route::post('createOrder', 'app/WxUser/createOrder');//创建订单getBusinessData3
Route::get('getOrderList', 'app/WxUser/getOrderList');//获取订单列表
Route::get('getOrderDetail', 'app/WxUser/getOrderDetail');//获取订单详情（立即购买后跳转）

Route::get('getMyTicket', 'app/WxUser/getMyTicket');//获取我的水票
Route::get('getTicketByGoodsId', 'app/WxUser/getTicketByGoodsId');//获取当前商品水票数量
Route::post('addBusiness', 'app/WxUser/addBusiness');//申请商家

Route::get('setOrderStatus', 'app/WxUser/setOrderStatus');//设置订单状态
Route::get('applyRefund', 'app/WxUser/applyRefund');//申请售后
Route::get('payOrderByTicket', 'app/WxUser/payOrderByTicket');//水票支付订单
Route::get('wapayUserGoods', 'app/WxUser/wapayUserGoods');//用户购买商品直接支付
Route::get('uporderUserGoods', 'app/WxUser/uporderUserGoods');//用户购买商品直接支付回调
Route::get('delOrder', 'app/WxUser/delOrder');//申请售后


Route::get('memberToBusiness', 'app/WxUser/memberToBusiness');//产看商家审核状态

Route::get('waterOrder', 'app/WxUser/waterOrder');//创建水票订单
Route::get('wapayWaterOrder', 'app/WxUser/wapayWaterOrder');//发起水票订单支付 order_no order_type //1商家订单 2用户订单 3用户水票订单
Route::get('uporderWaterOrder', 'app/WxUser/uporderWaterOrder');//水票购买完成回调  order_no order_type //1商家订单 2用户订单 3用户水票订单
Route::get('delAddress', 'app/WxUser/delAddress'); //删除地址

Route::get('getHaiBaoUrl', 'app/WxUser/getHaiBaoUrl'); //获取海报
//

//---------------------微信小程序商家端------------------------------------
Route::post('businessLogin', 'app/Index/businessLogin');//商家登录 返回商家信息

// 需要商家登录
Route::get('operationStatus', 'app/Business/operationStatus');//商家上下线
Route::get('getBusinessInfo', 'app/Business/getBusinessInfo');//获取商家信息
Route::get('indexOrder', 'app/Business/indexOrder');//首页订单状态数量
Route::get('indexChart', 'app/Business/indexChart');//首页饼状图
Route::get('afterOrderList', 'app/Business/afterOrderList');//商家售后订单列表
Route::get('orderList', 'app/Business/orderList');//商家获取订单列表
Route::get('financeList', 'app/Business/financeList');//商家金融端列表
Route::get('BusinessTixian', 'app/Business/BusinessTixian');//商家提现
Route::get('delDelivery', 'app/Business/delDelivery');//删除配送人员

Route::get('getCar', 'app/Business/getCar');//商家购物车
Route::get('addCart', 'app/Business/addCart');//增加商品 goods_id num
Route::get('delCart', 'app/Business/delCart');//减少商品
Route::get('cleatCar', 'app/Business/cleatCar');//清除购物车


Route::get('deliveryOrderList', 'app/Business/deliveryOrderList');//商家待分配订单列表
Route::get('getDelivery', 'app/Business/getDelivery');//指定排单列表
Route::get('dispatch', 'app/Business/dispatch');//派单
Route::get('deliveryOrderDetail', 'app/Business/deliveryOrderDetail');//待分配订单详情


Route::post('createDelivery', 'app/Business/createDelivery');//增加配送员
Route::get('getEmployList', 'app/Business/getEmployList');//获取员工列表
//Route::get('businessPurchase', 'app/Business/businessPurchase');//创建商家订单
Route::get('businessPurchase', 'app/Business/businessPurchase2');//创建商家订单

Route::get('businessOrderList', 'app/Business/businessOrderList');//获取商家订货单列表
Route::get('setBusinessOrderStatus', 'app/Business/setBusinessOrderStatus');//商家确认收货
Route::get('payOrderByBalance', 'app/Business/payOrderByBalance');//商家订货订单支付


Route::get('getBusinessData1', 'app/Business/getBusinessData1');//商家端数据1
Route::get('getBusinessData2', 'app/Business/getBusinessData2');//商家端数据2
Route::get('getBusinessData3', 'app/Business/getBusinessData3');//商家端数据3
Route::get('getBusinessData4', 'app/Business/getBusinessData4');


//---------------------微信小程序配送员------------------------------------
Route::post('DeliverLogin', 'app/Index/DeliverLogin');//配送员登录
Route::get('getPeopleInfo', 'app/People/getPeopleInfo');//获取配送人员信息
Route::get('GoOnline', 'app/People/GoOnline');//配送员上线
Route::get('offOnline', 'app/People/offOnline');//配送员下线
Route::get('getPeopleOrderList', 'app/People/getOrder');//查询配送订单
Route::get('getFinishOrderList', 'app/People/getFinishOrderList');//查询配送订单
Route::get('deliverOrder', 'app/People/deliverOrder');//确认送达
Route::get('verifyOrder', 'app/People/verifyOrder');//扫码核销
Route::get('peopleData', 'app/People/peopleData');//扫码核销




//---------------------商家订货支付------------------------------------
Route::get('wapay2', 'app/UserBase/wapay2');//支付测试
Route::get('wapay', 'app/UserBase/wapay');//商家订货支付 order_no order_type
Route::get('uporder', 'app/UserBase/uporder');//支付返回order_no order_type

//生成二维码
//qrcode
Route::get('qrcode', 'app/Index/qrcode');//支付返回order_no order_type
//
Route::get('c', 'app/WxUser/c');













